using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Http;

namespace TerritoryGame.Application.Dtos;

/// <summary>
/// 上传文档DTO
/// </summary>
public class UploadDocumentDto
{
    [Required(ErrorMessage = "用户ID不能为空")]
    public Guid UserId { get; set; }
    
    [Required(ErrorMessage = "知识库ID不能为空")]
    public Guid KnowledgeBaseId { get; set; }
    
    [Required(ErrorMessage = "文档标题不能为空")]
    [StringLength(200, ErrorMessage = "文档标题长度不能超过200个字符")]
    public string DocumentTitle { get; set; } = null!;
    
    [Required(ErrorMessage = "文件不能为空")]
    public IFormFile File { get; set; } = null!;
    
    [StringLength(50, ErrorMessage = "访问级别长度不能超过50个字符")]
    public string DocumentAccessLevel { get; set; } = "private";
}
